package com.mdxx.xczd.db.dao;

import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

import java.util.ArrayList;
import java.util.List;

public class VideoServerDAO extends ServerDAO{

	public VideoServerDAO(Context context) {
		super(context);
	}

	@Override
	public List<String> queryMulti(String sql) {
		List<String> list = new ArrayList<String>();
		SQLiteDatabase db = null;
		Cursor cursor;
		try {
			db = dbHelper.getWritableDatabase();
			cursor = db.rawQuery(sql, null);
			while (cursor.moveToNext()) {
				String video = cursor.getString(cursor.getColumnIndex("video"));
				list.add(video);
			}
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (null != db) {
				db.close();
			}
		}
		return list;
	}

}
